package com.yanqu.road.logic.activity.foxcard.game.effect;

import com.yanqu.road.entity.activity.foxcard.FoxHandCard;
import com.yanqu.road.logic.activity.foxcard.game.FoxCardGameLogic;
import com.yanqu.road.logic.activity.foxcard.game.eFoxCardTriggerType;

/**
 * 计分后，剩余手牌中可触发的能力牌，触发次数+1
 */
public class FoxCardEffect35 extends FoxCardEffectBase {
    @Override
    protected void effectHandle(FoxCardGameLogic gameLogic, FoxHandCard handCard) {
        if (triggerType != eFoxCardTriggerType.AFTER_SCORE) {
            return;
        }

        int times = Integer.valueOf(effectConfig.getParamsList().get(0));
        for (int i = 0; i < times; i++) {
            //分数结算后触发剩余手牌
            for (FoxHandCard remainHandCard : gameLogic.getGameData().getHandCards()) {
                gameLogic.dealHandCardBuff(remainHandCard, eFoxCardTriggerType.HOLD_HAND_CARD);
            }
        }
    }
}
